var path = require("path")
var fs = require("fs")

var ph = "E:\\project\\KuangChangQianDuanHouTai\\src\\routes"
fs.readdir(ph, function (il, f) {
    for (var i = 0; i < f.length; i++) {
        var d1 = path.join(ph, f[i], "index.js")
        if (fs.existsSync(d1)) {
            console.log(f[i])
            if(f[i]=="projectCarClassesReport"){
                debugger
            }
            var c = fs.readFileSync(d1, "utf-8")
            var idx = c.indexOf("listProps")
            if (idx < 0) continue
            var idx2 = c.indexOf("onChange",idx)
            var idx3 = c.substring(idx,idx2).indexOf("tableSize")
            if(idx3<0)continue
            idx3=idx+idx3
            var k=c.substring(0,idx3)
            var k2=c.substring(idx3)
            var k4=k+"size:"+k2
            console.log(k4)
            fs.writeFileSync(d1,k4,"utf-8")
        }
    }
})
